const acorn = require('acorn');

// 非严格模式代码，包含 with 语句
const nonStrictCodeWithWith = `
function foo() {
    with (__uiaas_context__.w) {
        console.log(x);
        console.log(y);
    }
}
`;

try {
    const ast = acorn.parse(nonStrictCodeWithWith, { ecmaVersion: 2020 });
    console.log('Parsed non-strict mode code successfully:', ast);
} catch (error) {
    console.error('Failed to parse non-strict mode code:', error.message);
}
